package com.example.siyun.service.impl.shouyeserviceimpl;

import com.example.siyun.mapper.shouyemapper.LoginlogMapper;
import com.example.siyun.pojo.Loginlog;
import com.example.siyun.service.shouyeservice.LoginlogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
/**
 * @Auther: 全
 * @Date: 2022/9/26 09:33
 * @Description:首页的登录日志
 */
@Service
public class LoginlogServiceImpl implements LoginlogService {
    @Autowired
    private LoginlogMapper loginlogMapper;
    /**
     * 获取登录日志信息
     * @return 返回登录日志的数组信息
     */
    @Transactional
    @Override
    public List<Loginlog> getLog() {
        return loginlogMapper.getLog();
    }
    /**
     * 登录时添加登录的数据
     * @param loginlog 登录的信息
     */
    @Transactional
    @Override
    public void insertLog(Loginlog loginlog) {
        loginlogMapper.insertLog(loginlog);
    }
}
